
// 验证手机号是否存在
export const verifyPhone = async (phone) => {
    let response = await fetch('/api/webapi/verify_phone', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
            phone
        })
    });
    response = await response.json();
    return response;
}

// 登陆
export const login = async (data) => {
    let response = await fetch('/api/webapi/login', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(data)
    }); 

    response = await response.json();
    return response;
}


// 解密
export const decrypt = async (data) => {
    let response = await fetch('/api/webapi/decrypt', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(data)
    });
    response = await response.json();
    return response;
}